package com.athuawei.collection;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ArrayListInit {
    public static void main(String[] args) {
        Thread threadA = new Thread(() -> {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("aa");

        });
        Thread threadB = new Thread(()->{
            try {
                threadA.join();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("bb");
        });
        threadA.start();
    }
}